<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Nfc Info: NfcInfo Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="NfcInfo80.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nfc Info
   
   </div>
   <div id="projectbrief">Shows all information about NFC tags available through Qt Mobility APIs. Includes reusable convenience classes for handling additional tag types: Smart Poster, Image and vCard.</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-slots">Public Slots</a> &#124;
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">NfcInfo Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="NfcInfo" -->
<p>The <a class="el" href="class_nfc_info.html" title="The NfcInfo class manages the interaction with the Nfc hardware, parses the tags and emits informatio...">NfcInfo</a> class manages the interaction with the Nfc hardware, parses the tags and emits information signals for the UI.  
 <a href="class_nfc_info.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="nfcinfo_8h_source.html">nfcinfo.h</a>&gt;</code></p>

<p><a href="class_nfc_info-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-slots"></a>
Public Slots</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_info.html#a20c5d7955339faa2cbc0a8f7a0f42f11">checkNfcStatus</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if NFC is supported by the device and if it is activated.  <a href="#a20c5d7955339faa2cbc0a8f7a0f42f11"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_info.html#aa872ff46ad5c0c80c3119d5ccfed4674">initAndStartNfc</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the NFC access for NDEF targets and start target detection.  <a href="#aa872ff46ad5c0c80c3119d5ccfed4674"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_info.html#aea0a67147285a08a05f86108a9b68a7d">nfcWriteTag</a> (const QString &amp;nfcTagText)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the message for writing to the tag and attempt to write it.  <a href="#aea0a67147285a08a05f86108a9b68a7d"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="signals"></a>
Signals</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_info.html#ab8520100ca496a52fe0a87b1b8aacd2e">nfcStatusUpdate</a> (const QString &amp;nfcStatusText)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_info.html#a942b9307fe06ebc8bb49a2a7df5e4f98">nfcStatusError</a> (const QString &amp;nfcStatusErrorText)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_info.html#a4606bb617667c34b9c26b2789a73e53a">nfcInfoUpdate</a> (const QString &amp;nfcInfoText)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_info.html#a0f0785dee49dcc17792ae84804965add">nfcTagContents</a> (const QString &amp;nfcTagContents)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_info.html#a759e842a08d75b2658f727d47068c730">nfcTagImage</a> (const int nfcImgId)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_info.html#a6bcf867555cecd04e4cea39875d7a2b8">nfcTagError</a> (const QString &amp;nfcTagError)</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a581832833fde8cf0fb717f9ea0530f4e"></a><!-- doxytag: member="NfcInfo::NfcInfo" ref="a581832833fde8cf0fb717f9ea0530f4e" args="(QObject *parent=0)" -->
&#160;</td><td class="memItemRight" valign="bottom"><b>NfcInfo</b> (QObject *parent=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_info.html#a7ca1253d5b232e51f13648ffb26ae311">setImageCache</a> (<a class="el" href="class_tag_image_cache.html">TagImageCache</a> *tagImageCache)</td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="class_nfc_info.html" title="The NfcInfo class manages the interaction with the Nfc hardware, parses the tags and emits informatio...">NfcInfo</a> class manages the interaction with the Nfc hardware, parses the tags and emits information signals for the UI. </p>
<p>Following the use case of this application, the emitted signals contain mostly textual descriptions of the events or the information. Therefore, it is a good example to understand how the APIs are working and what kind of information you can get through the Qt Mobility APIs.</p>
<p>Additionally, this class demonstrates how to parse tags and how to extract the relevant information - e.g., the parameters of a Smart Poster record, the image of a Mime record or the QContact coming from the versit document stored on a mime / text-vCard record.</p>
<p>More comprehensive support for writing tags will be added in a later release. The focus of this version is on reading and parsing tags - even though all classes already work in both directions and it's mostly the UI that is missing. </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a20c5d7955339faa2cbc0a8f7a0f42f11"></a><!-- doxytag: member="NfcInfo::checkNfcStatus" ref="a20c5d7955339faa2cbc0a8f7a0f42f11" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool NfcInfo::checkNfcStatus </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if NFC is supported by the device and if it is activated. </p>
<p>Note: currently, this is only implemented for Symbian using nfcsettings component (which uses native Symbian code to query the NFC status).</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if and only if NFC is available and activated on Symbian. The nfcStatusError / nfcStatusUpdate signals contain more information about the actual status (e.g., if the device would support NFC but the user needs to activate it). </dd></dl>

</div>
</div>
<a class="anchor" id="aa872ff46ad5c0c80c3119d5ccfed4674"></a><!-- doxytag: member="NfcInfo::initAndStartNfc" ref="aa872ff46ad5c0c80c3119d5ccfed4674" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool NfcInfo::initAndStartNfc </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize the NFC access for NDEF targets and start target detection. </p>
<p>This method emits nfcStatusUpdate signals containing the textual results of the operation.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if starting target detection was successful. </dd></dl>

</div>
</div>
<a class="anchor" id="a4606bb617667c34b9c26b2789a73e53a"></a><!-- doxytag: member="NfcInfo::nfcInfoUpdate" ref="a4606bb617667c34b9c26b2789a73e53a" args="(const QString &amp;nfcInfoText)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcInfo::nfcInfoUpdate </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>nfcInfoText</em></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Generic information about a new tag that was detected </p>

</div>
</div>
<a class="anchor" id="a942b9307fe06ebc8bb49a2a7df5e4f98"></a><!-- doxytag: member="NfcInfo::nfcStatusError" ref="a942b9307fe06ebc8bb49a2a7df5e4f98" args="(const QString &amp;nfcStatusErrorText)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcInfo::nfcStatusError </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>nfcStatusErrorText</em></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Error with NFC. </p>

</div>
</div>
<a class="anchor" id="ab8520100ca496a52fe0a87b1b8aacd2e"></a><!-- doxytag: member="NfcInfo::nfcStatusUpdate" ref="ab8520100ca496a52fe0a87b1b8aacd2e" args="(const QString &amp;nfcStatusText)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcInfo::nfcStatusUpdate </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>nfcStatusText</em></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Update on the NFC status (starting target detection, etc.) </p>

</div>
</div>
<a class="anchor" id="a0f0785dee49dcc17792ae84804965add"></a><!-- doxytag: member="NfcInfo::nfcTagContents" ref="a0f0785dee49dcc17792ae84804965add" args="(const QString &amp;nfcTagContents)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcInfo::nfcTagContents </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>nfcTagContents</em></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Contents of the NDEF message found on the tag. </p>

</div>
</div>
<a class="anchor" id="a6bcf867555cecd04e4cea39875d7a2b8"></a><!-- doxytag: member="NfcInfo::nfcTagError" ref="a6bcf867555cecd04e4cea39875d7a2b8" args="(const QString &amp;nfcTagError)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcInfo::nfcTagError </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>nfcTagError</em></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>An error occured while reading the tag. </p>

</div>
</div>
<a class="anchor" id="a759e842a08d75b2658f727d47068c730"></a><!-- doxytag: member="NfcInfo::nfcTagImage" ref="a759e842a08d75b2658f727d47068c730" args="(const int nfcImgId)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcInfo::nfcTagImage </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>nfcImgId</em></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The tag contained an image. The parameter contains the image id that can be used to fetch it from the tag image cache class. </p>

</div>
</div>
<a class="anchor" id="aea0a67147285a08a05f86108a9b68a7d"></a><!-- doxytag: member="NfcInfo::nfcWriteTag" ref="aea0a67147285a08a05f86108a9b68a7d" args="(const QString &amp;nfcTagText)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool NfcInfo::nfcWriteTag </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>nfcTagText</em></td><td>)</td>
          <td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Create the message for writing to the tag and attempt to write it. </p>
<p>This method will be extended in future releases of this app.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>if it was already possible to write to the tag. If false is returned, the message is cached and will be written when a writable target is available. Only one message is cached; if this method is called a second time before the first message is actually written to a tag, the old message will be discarded and only the later one written to the tag. </dd></dl>

</div>
</div>
<a class="anchor" id="a7ca1253d5b232e51f13648ffb26ae311"></a><!-- doxytag: member="NfcInfo::setImageCache" ref="a7ca1253d5b232e51f13648ffb26ae311" args="(TagImageCache *tagImageCache)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcInfo::setImageCache </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_tag_image_cache.html">TagImageCache</a> *&#160;</td>
          <td class="paramname"><em>tagImageCache</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set the image cache to use for storing images retrieved from tags. <em>tagImageCache</em> instance of the image cache. This class will not take ownership of the instance! </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="nfcinfo_8h_source.html">nfcinfo.h</a></li>
<li>nfcinfo.cpp</li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Aug 29 2011 22:30:51 for Nfc Info by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
